Skip to content

docs(aws-serverless): update LMI skill for region expansion and scheduled scaling#201

Merged
krokoko merged 8 commits into
awslabs:mainfrom
sbbhimji:lmi-scheduled-scaling-region-expansion
Jun 30, 2026
Merged

docs(aws-serverless): update LMI skill for region expansion and scheduled scaling#201
krokoko merged 8 commits into
awslabs:mainfrom
sbbhimji:lmi-scheduled-scaling-region-expansion

Conversation

@sbbhimji

@sbbhimji sbbhimji commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Updates the aws-lambda-managed-instances skill (in the aws-serverless plugin) for two recent Lambda Managed Instances launches:

  1. Region expansion (announcement) — LMI is now available in all commercial AWS Regions except Israel (Tel Aviv), Middle East (Bahrain), Middle East (UAE), and Asia Pacific (Auckland). Replaces the previous fixed five-region list and updates the "Unsupported Region" handling to name the excluded Regions and suggest the nearest supported one.
  2. Scheduled scaling (announcement) — documents using Amazon EventBridge Scheduler to adjust MinExecutionEnvironments/MaxExecutionEnvironments on a one-time or recurring schedule for predictable traffic (scale up before peak, scale down or to zero when idle).

Files changed

  • SKILL.md: regional availability + unsupported-Region scenario; scheduled scaling trigger and scheduled-scaling tag in frontmatter; scheduled-scaling note in Step 3; two Operations best practices; reference-file pointers; Scaling docs link in Resources.
  • references/configuration-guide.md: new "Scheduled Scaling (Predictable Traffic)" section — behavior notes (still scales on CPU/concurrency between bounds; Min=Max=0 deactivates and needs explicit reactivation) and a common-patterns table.
  • references/infrastructure-setup.md: new "Scheduled Scaling (EventBridge Scheduler)" section — scheduler IAM trust/permissions policies, create-schedule examples targeting the PutFunctionScalingConfig universal target, and a manual put-function-scaling-config override.

Testing

  • dprint check — clean
  • markdownlint-cli2 (incl. custom skill-length + frontmatter rules) — 0 errors
  • lint:cross-refs — 0 errors
  • validate:refs — 0 broken links
  • validate:size — SKILL.md 225 lines / 1566 words, description 626 chars (all under limits)

Documentation-only change; content verified against the LMI scaling documentation. Uses placeholder identifiers (<account-id>) only.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

…uled scaling

- Region availability: now all commercial AWS Regions except Israel (Tel Aviv), Middle East (Bahrain), Middle East (UAE), and Asia Pacific (Auckland); update Unsupported Region handling.
- Scheduled scaling: document EventBridge Scheduler-based scheduled scaling of Min/Max execution environments for predictable traffic (SKILL.md, configuration-guide.md, infrastructure-setup.md).
@sbbhimji sbbhimji requested review from a team as code owners June 19, 2026 21:08
@krokoko

krokoko commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@sbbhimji thanks ! Don't forget to upgrade the version of the plugin in the multiple files

pcrai-aws and others added 4 commits June 30, 2026 15:44
  - Add formulas for deriving MaxConcurrency, MemorySize, and
    MinExecutionEnvironments
    from Lambda Insights metrics (cpu_total_time, memory_utilization,
ConcurrentExecutions)
  - Add fallback guidance when Lambda Insights is not available
  - Add Lambda Insights enablement instructions
  - Fix default memory-to-vCPU ratio from 4:1 to 2:1 (matches public
    docs and CDK defaults)
  - Fix weighted alias traffic shifting claim (not currently supported
    for LMI)
  - Add testing phase troubleshooting guidance (CPUThrottles,
    MemoryThrottles,
    DiskThrottles, ConcurrencyThrottles, low CPU utilization)
  - Update Best Practices to align with corrected defaults
… formatting

Follow-up to the migration-assessment PR: correct the broken Lambda Insights versions doc URL and add blank lines around lists in troubleshooting.md so dprint/markdownlint pass.
Region expansion + scheduled scaling + migration-assessment guidance are backward-compatible feature additions to the LMI skill (minor bump). Updated plugin.json, .codex-plugin/plugin.json, and marketplace.json.
@krokoko

krokoko commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

@bfreiberg @jaycol-aws could you please have a look ? thanks !

@jaycol-aws

Copy link
Copy Markdown

Taking a look

@jaycol-aws

Copy link
Copy Markdown

Looks good for the most part. Only thing I would call out is

MemorySize = max(2048, MaxConcurrency × (memory_utilization / 100) × current_allocated_memory) 

can exceed the 32GB max as written, should wrap in another min statement so it cannot exceed 32GB.

Address review feedback: the MemorySize derivation had a floor (max with 2048) but no ceiling, so it could exceed the 32 GB LMI limit. Wrap in min(32768, ...) to cap at the maximum.
@sbbhimji

Copy link
Copy Markdown
Contributor Author

Looks good for the most part. Only thing I would call out is

MemorySize = max(2048, MaxConcurrency × (memory_utilization / 100) × current_allocated_memory) 

can exceed the 32GB max as written, should wrap in another min statement so it cannot exceed 32GB.

Good catch. just fixed it

jaycol-aws
jaycol-aws previously approved these changes Jun 30, 2026

@jaycol-aws jaycol-aws left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

krokoko
krokoko previously approved these changes Jun 30, 2026
@krokoko krokoko self-requested a review June 30, 2026 21:46
@krokoko krokoko added the do-not-merge Do not merge the pull request label Jun 30, 2026
main already advanced aws-serverless to 1.2.0 via the aws-lambda-microvms skill (awslabs#202). Bump this PR to 1.3.0 to avoid a duplicate-version collision; the LMI region/scheduled-scaling additions are backward-compatible features (minor bump from 1.2.0).
@sbbhimji sbbhimji dismissed stale reviews from krokoko and jaycol-aws via e54ba63 June 30, 2026 21:56
@krokoko krokoko enabled auto-merge June 30, 2026 21:57
@krokoko krokoko requested a review from jaycol-aws June 30, 2026 21:57
@krokoko krokoko removed the do-not-merge Do not merge the pull request label Jun 30, 2026
@krokoko krokoko added this pull request to the merge queue Jun 30, 2026
Merged via the queue into awslabs:main with commit 8adddcc Jun 30, 2026
24 of 25 checks passed
@sbbhimji sbbhimji deleted the lmi-scheduled-scaling-region-expansion branch June 30, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants